{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Dataset\n",
    "Open3D comes with a built-in dataset module for convenient access to commonly used example datasets. These datasets will be downloaded automatically from the internet."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Jupyter environment detected. Enabling Open3D WebVisualizer.\n",
      "[Open3D INFO] WebRTC GUI backend enabled.\n",
      "[Open3D INFO] WebRTCWindowSystem: HTTP handshake server disabled.\n",
      "[Open3D INFO] Downloading https://github.com/isl-org/open3d_downloads/releases/download/20220201-data/EaglePointCloud.ply\n",
      "[Open3D INFO] Downloaded to /home/chyang/open3d_data/download/EaglePointCloud/EaglePointCloud.ply\n",
      "[Open3D INFO] Window window_0 created.\n",
      "[Open3D INFO] EGL headless mode enabled.\n",
      "[Open3D INFO] ICE servers: [\"stun:stun.l.google.com:19302\", \"turn:user:password@34.69.27.100:3478\", \"turn:user:password@34.69.27.100:3478?transport=tcp\"]\n",
      "WARNING: Using soft CircularBuffer (6144 KiB)\n",
      "[Open3D INFO] Set WEBRTC_STUN_SERVER environment variable add a customized WebRTC STUN server.\n",
      "[Open3D INFO] WebRTC Jupyter handshake mode enabled.\n",
      "FEngine (64 bits) created at 0x48d7860 (threading is enabled)\n",
      "EGL(1.5)\n",
      "OpenGL(4.6)\n"
     ]
    }
   ],
   "source": [
    "import open3d as o3d\n",
    "\n",
    "if __name__ == \"__main__\":\n",
    "    dataset = o3d.data.EaglePointCloud()\n",
    "    pcd = o3d.io.read_point_cloud(dataset.path)\n",
    "    o3d.visualization.draw(pcd)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- Datasets are downloaded can cached automatically. The default data root is ~/open3d_data. Data will be downloaded to ~/open3d_data/download and extracted to ~/open3d_data/extract.\n",
    "- Optionally, you can change the default data root. This can be done by setting the environment variable OPEN3D_DATA_ROOT or passing the data_root argument when constructing a dataset object.\n",
    "\n",
    "# PointCloud\n",
    "## PCDPointCloud\n",
    "Colored point cloud of a living room from the Redwood dataset in PCD format."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dataset = o3d.data.PCDPointCloud()\n",
    "pcd = o3d.io.read_point_cloud(dataset.path)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## PLYPointCloud\n",
    "Colored point cloud of a living room from the Redwood dataset in PLY format."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "notes",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
